function addNewsApi(news) {
    return axios.post("/news", news);
}

function newsPageApi(page, pageSize, name) {
    return axios.get('/news/page', {
        params: {
            page: page,
            pageSize: pageSize,
            name: name
        }
    })
}

function delNewsApi(id) {
    return axios.delete("/news/" + id);
}

function getNewsByIdApi(id) {
    return axios.get("/news/" + id);
}

function updateNewsByIdApi(news) {
    return axios.put("/news", news);
}
